improve handling of default values