fix errors according to text