bug 945

https://gist.github.com/kkorekk/55a0ae97832b605b097f