Fix dropping last parameter

Fix bug where last parameter was being dropped