fixed 16-bit TIFFs, added error handling kludge