Fixed an issue with window moving