Bug 1421

https://gist.github.com/magul/9eae2af8f282b24cd871