Bad logic on double equal