Further bug fixes, refs #3