Bug fixes to Rprotdist