CLOUDIFY-2222 fix issue with app starting twice when running from main