fixes issue 32, could stop with error when using lossy_transparent with palette