fix a bug and optimize some code
0.2.25