another casting fix