bug fix

added ypcall around code where stud gap is changed