Fixed switch issues