fixing issue #6