Adding mutex to every plan