Fix the case statements to match platform