Updated from current master (1e4b4ecb75bf617c3ebee56e390d1db3ea047c1e)