Fixed a couple of error which arose on the merge with ww3.