repair callback and add runOnce function