minor change to app instance handling