Additional fixes to get scan working.