fix a bug in getScanUnit()