Revised fix for hang-issue