This ticket combines Issue #424 and Issue #405
This ticket combines Issue #424 and Issue #405