Fix issues #3 and #6.