Fix remaining problems related to issue #7