Force type cast for Java6 compatibility