Restore test and fix regression