Fixes a cast warning.