fix callback timing