bugfix for beforeFind()