Fix casting problem
Appreciate perspective