fixes #142, #139