Trying to fix switch issue