bug_1040

https://gist.github.com/kkorekk/459105674c75493d0823