bugfix for logout bug