onError/onDone not closed correctly