fix some bugs in comment formatting