Bug fix caused by Java 1.7