fix scanCallback recursive issue