Added error handling for comment errors