Richtext null ref exception fixed