fix argument index for filter parameter
Merge pull request #356 from selaux/fix-filter-parameter

Fix filter parameter in toBuffer method