Fixed mapping bugs