fixed some ERC errors