Fix the find function

the change for pos is in the wrong block
Add include files for cbp