Making code compatible with java 1.5.