bug fixed simplify