fix window moving direction