fixed undefined before filterBy. need to handle refresh