Fix boost::too_many_args error

Fixes #333.