Fixed invalid case in simplification