Bug 717

https://gist.github.com/kszeluk/68a7ab7647e2c7a83423