Fix two minor bugs