Fixed crash on End Session