Added regression test case. Still need to test it though