Fixed many ERC errors