Resolved cast warnings.