removal of more compilation warnings

Some explicit casts to remove compilation warnings.