Fix crash on code