Safety checks added.