Fix Queue logic