Gui control

This fixes the null reference exception when in the presence of a pad. Also, the updating of show/hide build menu in the context menu now works.