fix a bug in build_comment function