fix mongodb query