Two small fixes (callback order and logging).