Changed switch order