fix bug when returning error for invalid comments