fixing up a couple bugs.