Proper fix for #975