fixed table names to match SQL etc.