fixed errors with map delete