fixed the mapping bug