Fixed bigendian integer encoding bug.
Fixed integer size handling properly.