fix osx frontground issue
Merge pull request #315 from zapion/fix_osx_frontground

fix osx frontground issue