Strange things happen to elements text