Small improvement of the validation loop.