removed some pointless casting