Fixes #2: offset out of bounds with an empty file