oops, fix wrong logic for validity check