Updated from commit 35689ef378bb88fa968b75c59c7219b1a8b4d7dd.