Adds check for location_prepend before iterating