Modified system class to make the window correctly sized