case statement fix