fixed some bugs where validation might crash