fix all crash caused by download handler