core: remove not needed casts