fix bug and add SparrowManager