Bugfixes for p refinement/coarsening