Data fields filter bug fix, refactoring