fixing error patterns