Compatible with mongoose 3.6