This should be moved outside the case statement.