fix bug for gif error.