fixed simplify bug