fixes #6244
Merge pull request #6290 from lberruti/fix_complex_args

fixes #6244