"beat a hasty retreat" means run away.