fix build script to stage the app and start it correctly