Add check for localOnly = false