Fix handling of named arguments