mongo validate bug fix