Fixed a couple bugs after the merge