fixes #59 and fixes #60 and fixes #58