added usage of valid_* filters, fix