Possible fix for #535