hacking to prevent strange crash on Mongoid 2 and 3