numerous bug fixes, among other things