fix argument handling

thanks @bcoe