Fix for a warning about complex casting