Fix window bounds fix code, thanks @nightwing for the tip.