Resolving issue #753
Fixing issue #583