Fixed various variant-related loopholes.