Bug fix due to mongoid new syntax