bugfixes to gadget.ypr