Pull request 2 for bug #23

Pull request 2 for bug #23