fix: added the minus-check to the part after the loop