Fix error when deleting transition