fixed some callback problems