insert mappings bug fixes