fixed issues with SQL JOIN queries that screwed up drop down lists