Finally a working version that does not block...
Working tests