fix parent types calculation