fixed calculation of size of unbounded queue