Fix error close