Add bug fix for look_up function