Fixed two trivial bugs