Fix policy generation