Bug fix in mapping generator