fix callback order