changed condition to make hash stop work even with cookie set