Simple compiler warnings fix due to incorrect typecasting

Trivial.