fix #9: don't use lastChild