fix serious bug of moving box to the right