Proper fix for #115 in 1.7.x branch