Add castings

Prevents warnings