Fixing http://code.google.com/p/mongoose/issues/detail?id=392