fixed problem with bandwidth limit and unsigned integer math