fix position changed logic