cast updates correctly