Fixing hard-coded table references