Fixes for comment function

FIx all the bugs!