fix old style cast