bug fix
fixed bugs for code error