Fixed type hinting in register callback example