Added some checks.