Fixed error on logout