fix bug with location