a bugfix in main.js, util enchancements to control_table.