more casting funk fixes