Synced with testing branch (1.12.23)