Fixed two small bugs