fix argument checks when using defaults

fix argument checks when using defaults