fix first filter, issue #19
fix last filter, issue #19