Phase transitions in Pb8O5(XO4)2 (X = As and V) compounds