Fixed issue #1083.
Fixed issue #1011.