Removes not needed casts