#306 Fix comment adding error caused by event handler