fixed bug introduced by simplification