Some bug fixes

Fixed some cosmetic bugs.