wip
fix compiler warning with cast