fixed filtering to respect filtering attribute