Fixed bug that caused windows to be positioned outside the screen in case windows are saved with offscren values (e.g. when swithing between displays).