Remove unnecessary type cast