and fix the error that occurred