Bug 2538

https://gist.github.com/piotr-mazurek/c4aafe1ea9e13d5b24e0