Fixed some bugs per Scoot's comments.