Updated from commit 82f47cea4a0e82b4eaa6fd4fb73013d772fbb458.