bug fixes and test case for Funnel
Merge remote-tracking branch 'origin/master'