fixing flavor-related lua errors