fixes #131 and #134