Fix issues with string formatting when using new ref checking
Fix bad reference finder!