Bug 653

resolved, please review

https://gist.github.com/jchrusciel/2e790d3c1608b74ec63e