I wonder if this check should perhaps be put in every public function, since there are some that don't make there way this deep.