Fixed some problems that were missed with the previous merge.