Fix long value cast on readVariableByte