Added cast. This prevents a compiler error for Java 1.6.