correct bug and fix error