Fixed mapping bugs.