more bug fixes from testing. Now *should* produce results, or at least not produce errors