bug fixing / error checking at getAllProjects/Principals