Insert text bug fix