Fix for #3331

Fix for #3331
I amended the commit