Fix resource query bug
Fix duplicate host bug
Merge branch 'location_host' into dev