Fixed some issues related to merging in the latest changes.