Fixed two minor bugs that appeared during testing.