Bug 1423

https://gist.github.com/magul/4db3ff24d603dfe07130