fixed error handling in cloud mopde