fixing commands not returning properly and tests failing when serve command waits for the app server before returning