AGPUSH-885: moved currentLocation initialization above conditional block