fixed error handling for comments