Robust HashPrefix initialization (closes #300)