Fixes to scan lookup, more coming