Merged Dennis` changes.
issueID #11