Make client compatible with java 7