Updated to integrate with principal check.