fixed ByteCount and LowerAddress calculation bugs