fixed a faulty mapping query