fix scan bug