added unmap_attributes for extra safety