fixed two lockup bugs producing console errors and possible knock-on effects