Fix unnecessary type cast