Fixed a couple of problems with relaunching apps.