Fixes for generator