Fixed a bug with reset assignment