Some fixes in switch statements and fixed queue-list.