Fix `mul` simplification

Fix for issue #212.
This chunk I need to review very very carefully. Also we need to benchmark it. I'll try to do it tomorrow.