fixed some callback issues