Bug 926

Please review.
https://gist.github.com/aadamski/ae46c5c58c721048a9ef