Window now resizes correctly