Bug 2531

https://gist.github.com/artpard/c2bb3c70fe502704923f