Fixed an error related to continuing in For-Each loop