Improved legacy handling