Removed redundant cast that was causing a compiler warning