Closing modal when object is added to collection