add check, fix scan range