scoreboard: improved hooking code