Fixed null location bug.