fix some mapping problems