Fixed #5872: Fix issues