Bug 2511

https://gist.github.com/piotr-mazurek/74725387956796bda5b4