Merge from https://gist.github.com/gregmac/9120209