Fixed the Rate Eq. Channel Allocation

Also sometimes there is a null pointer exception for the next packet in
the queue. Added a continue statement for null