fixed two minor bugs.