the api method should not change the args hash (fixes issue #365)

It's a quick fix for the issue #365.