Fixes to sub search