Fix infinite loop (bug introduced by previous commit)