Remove unsafe uses of reset