Issue #169

Fixed issue #169. Please review.