small fixes for lazy-generation