Changed switch directive as the old one was not compatible with ie in windows 8.1