bootstrap tweaks and a debug counter