Fixed a type and reordered the case statements

Making it more inline with the existing code…