improved default value handling