Fixed ZeroDivisionError in queue library