Fix bug on window