Fixed some of the changes missing in branch, after comparing with master.