Fix to compile with Java7
Need to cast when extending generic interface