fixing apply_tuple