Added a check that room existed before deleting ids from it.