switch condition logic

Signed-off-by: Paul de Wouters <paul@hmn.md>