Fix EventQueue bug and simply EventQueue code