fixed a bug related to parameter order