More "endless" tests
Fix "empty endless loop" test
Fix type error in "handle" function.