better handling for bringing the window to front
Merge branch 'develop'