#549 add principal check