fixes after code review in better-dom PR