Bug 1761

https://gist.github.com/romankierzkowski/f3e2141e12dde4ecf79a