fix callback.length issue