fixed register file

there were problems with the sensitivity list and race conditions