Warning fixes

Fixed a few compilation warnings related to unchecked casts and removed a spurious whitespace.