Trying to find out what causes invalid transitions