fixing show only maximized bug