Loop interrupt fix