fix bug issue #6