Fixed issue #3626

This fixes #3626

I changed the unit test because it was failing.