bugfix for validity