Removing unecessary cast