Fixed bug with switch: https://github.com/Sammaye/MongoYii/issues/35