more policy generation fixes