I dropped the keepAppOpen stuff entirely. It was a bit weird.