multiple issues (#116, #117, #119)

fixes #116
fixes #117
fixes #119