Fix bug in conditional transition