fixed bug with setlocation command