Bug 1617

https://gist.github.com/novirael/ed1bceedb85f89a1c7c8