fixed erc bug