fix take_first and take_first_not