fixed crash for primitive args
TODO: also do this for the filters