Fix #48, send_quota overflowing int32. Converted to uint32 and fixed a n...

...umber of casts.