Fixed bug causing window not to center on screen