don't hang in endless loop
also build tests