Fixed a couple bugs from the merging.