fixed byte ordering issue