Remove unneeded cast<>.