multiple issues (#169, #173)

fixes #169
fixes #173