Fix Download manager stability issues & more unit tests