fix error crash