trying this, found on stackoverflow.... lets hope this way it does not hang anymore... so often