debug of a minor issue, corrected before and back because of me renaming some variables