fix some mongo queries