fixed crucial bug