Fixed a cast warning.