Made window appear in right place