Fixing bug in find_element