fixed some cases of close hang