fixing very slight bug in validation