Fixed memory leak with ReadText
Fixed heap corruption with image