Removing the last String casting to lower runtime memory