some fixes and improved detecting location

There may be more problems like with spectating