Fixed many warnings