imrpoved bad script recognition