Proper fix for #1053