Corrected event polling and flags

Checking multiple flags or events does not work with switch.
Corrected the flags put on the channel flags.