Handle isLocal detection better..