wattr, wtp: properly take borders in consideration