fixed gap in queue code