Resolve cast warning.