diff --git a/src/geotiff.js b/src/geotiff.js
index <HASH>..<HASH> 100644
--- a/src/geotiff.js
+++ b/src/geotiff.js
@@ -212,8 +212,8 @@ GeoTIFF.prototype = {
           this.dataView.getUint16(nextIFDByteOffset, this.littleEndian);
 
       var fileDirectory = {};
-
-      for (var i = byteOffset + (this.bigTiff ? 8 : 2), entryCount = 0; entryCount < numDirEntries; i += (this.bigTiff ? 20 : 12), ++entryCount) {
+      var i = nextIFDByteOffset + (this.bigTiff ? 8 : 2)
+      for (var entryCount = 0; entryCount < numDirEntries; i += (this.bigTiff ? 20 : 12), ++entryCount) {
         var fieldTag = this.dataView.getUint16(i, this.littleEndian);
         var fieldType = this.dataView.getUint16(i + 2, this.littleEndian);
         var typeCount = this.bigTiff ?
Fixing wrong base offset, only the first IFD offset was used.