fix bug when callback is undefined
Merge branch 'jifeng-master'