Merged pull request from spilliams