fix bug and syntax