Fixed bad getQueue function