tweaked configuration options; fixed some logic errors and typos that caused unexpected crashes.