fix when type change parent