Remove unnecessary casting