Fixed two minor bugs