Fixed crash when authen