Fix debug message
Fix off-by-one
Remove unused define