fixed bug in Location model