Redone Cox location logic, no more NPEs