fixed weird logout issue