fixed a long-lasting bug that was failing to close the request