fixes #60 and #33