bug fix where location var wasn't there