Added marginal test case, but seems to work