Bug that connections are not closed properly fixed.