Fixed #3353 with better approach