Fixed switch issue with java 1.6