fixed some validity issues