Solve Warning "deprecated conversion" error