Fix missing cast
Fixes CSW-157