fixed several bugs related to start apps in AWS