Bug fixed, improve performance