fix the reset problem