Fixing bugs in using reverse equation string