Fix Undefined offset/variable

See https://github.com/redbeardmedia/rd2wgs48/issues/1