Manual merge of @mtub pull request #159