bug_1021

https://gist.github.com/kkorekk/ed58e021ae2f82c2b72a