Bug 1058

https://gist.github.com/pkucmus/9fb854e9042e54aea487