Fixing some ERC issues