Merged some changes that got dropped.