fixing a bug related to the position of the self-contained tags