Omar, mercurial is about an immutable, historical record of you work. You can/should fix your error in all the heads, but it stays in history forever like a scientist's logbook.
There are plenty of ways to go about Editing History including histedit, convert, mercurial queues, and import/export/transplant, but none of them a strictly speaking Mercurial as it should be used, and all of them alter the hashids for all subsequent changesets which breaks the clones of anyone else working on the project.
Short answer: If at all possible make your peace with keeping the old data in history and correct it in a new revision.