bug fix and add new delegate