fixed some ERCs and simplified reset