script: fix table access and backend selection