Fixed data promotion, ie uint32 goes to dlong, uint16 goes to lon.
Fixed a bug causing int32/uin32 to incorrectly calculate the reverse indices.