added explicit type case to avoid java 8 compile problem