Fixed bug where BB code would not end properly