multiple issues (#157, #158)

fixes #157
fixes #158