BB code parsing fixes