Slight fix to improve the way find keys functions.