Fix bug in TGA.