Fixing case statement