fix for double logout error