fixed some minor bugs in updated identity code