more robust argument handling