refactor code for avoid NPE
Merge branch 'multiThread-feed'