Merged tmbrye's pull request