bug of frame switching was fixed