Fixed issue with newer atom-shell

https://github.com/atom/atom-shell/issues/649#issuecomment-55210875
Quick refactor