fix for hang problem