diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php
index a8edb9df1..1dab93fcb 100644
--- a/e107_handlers/e_parse_class.php
+++ b/e107_handlers/e_parse_class.php
@@ -4670,7 +4670,9 @@ class e_parser
 			{
 				$tag = base64_decode($val['alt']);
 				$repl = ($retainTags == true) ? '$1'.$tag.'$2' : $tag;
-				$text = preg_replace('/(<x-bbcode[^>]*>).*(<\/x-bbcode>)/i',$repl, $text); 
+			//	$text = preg_replace('/(<x-bbcode[^>]*>).*(<\/x-bbcode>)/i',$repl, $text);
+				$text = preg_replace('/(<x-bbcode alt=&quot;'.$val['alt'].'&quot;>).*(<\/x-bbcode>)/i',$repl, $text);
+
 			}	
 		}