Fix crash on finishing flow