fixed an error in shepherd