Fixing window drawing