fixed a bug in check_styled_tags method