Issue/1600

Fixes Issue #1600. Now with (some) test cases.