fixed a findOne query bug