Fix #1057
Pass a function to find