Quick fix for issue 3745
Fix broken tests
Add test for issue 3745