fixed bug in handling default value