some cosmetic improvements
Fix overflow bug counting instructions