Fix crash on update