Changed again so that it should work with java 1.6.