Fixed two stupid bugs