Fixed issue when location not found

plus various random changes