fix views generator to work past v12