Fix candidate to bug #615
Mark backend reference closed in handleError