fix bug and comments