bug_999

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