Fixed a missing cast due to CompileStatic