Added device release and resized window on device initialization.