bug_1039

https://gist.github.com/kkorekk/60cb19bc959f228649cc