Change generics to be java 6 compatible