Bug 771

https://gist.github.com/kchomski/aa0fdcf60a7694007c7c