Fix warning cast