Added testcase for #593