more identity calculation fixes