fixed a few bugs in queue.c and mab_cpu_main.c