fixed two minor bugs