Fixing Null pointer exceptions on list location