Fixes to improve relayprog