Proper fix for #1529