Fix issue #25. Forgot typeof. Simplify control structure.

Signed-off-by: Max Fierke <mfierke@bjornmueller.(none)>