Bug #3 fix

(also does pull #6)