Reorder switch cases

Signed-off-by: Ondrej Kupka <ondra.cap@gmail.com>