More robust comment checking