cleanup uneeded cast