Generator security improvements