Added events and function for when adding a parameter is cancelled