Fixing a major bug in filtering and validation of data