fixed generics issue (java 6 vs. java 7)