Corrected skipcomments logic