Fix remove boundaries nodes method.