Fixed issue #1291