Fix bugs when creating incidents.