Fix some implementations for DOM tree accessors