improve low memory stability
Allow bit-packing of refs for low memory boards (fix #145)