Some minor bug fixes incurred from the recent merge of newstructure and development.