added check that positions in closing tags is set