Fix issue #29.

@pcl @edwardsa