Fix inputstream error.