Bug 1403

https://gist.github.com/magul/abe06ebd566e2daf5bb2