tidy up fix for #3981, thanks matt kruse