fixed the comments boundary logic