fix bbcode parsing