Fix tests starting and stopping apps