reg code tweaks
fix regcode counts