fixed pull request

Pull request #237 with proper commit messages.