added a hangloose count limit