Added a few checks.