Corrected case statement so conditions match input.