PrimAssignP and some fixes