Fixed another, new, case where the script would get stuck