Fixed argument resolving

Fixes #572