fixed a bug related to default parameters