Fixed a type and reordered the case statements

Making in more inline with the existing code…
Merge pull request #675 from svanharmelen/f-fix-typo/style

Fixed a type and reordered the case statements