Fix for shaping of domain elements