Merge pull request #509 from fahadhatib/develop

Develop
Merge pull request #510 from fahadhatib/develop

Develop
Fix error in locations sql statement
Merge pull request #511 from timschofield/develop

Fix error in locations sql statement