Update from lunaryorn/blog@35b25c7ac65661330fbbefd47bc91a237ab54181