Various bug fixes to get the software running again.