cast fix to appease buildbot