improved double handling