Added correct switching