Revert "Revert "Fixed reset""

This reverts commit d5a1350299776e0af8d28d07200ba5e16d6efb5b.