add a safety check.