Fix for java 7