Corrected bugs in the distance_array functions of lm/gl/hp space and in HPLMTransformation and LMHPTransformation