Fixed switch code