fixed issue #2507