fixing filtering issue