Fixed issue #2582