Fix to prevent another potential infini loop