More generation fixes