fixes logout issue