Fix for issue: https://github.com/Sammaye/MongoYii/issues/45