Fix errors on image displaying