Data insert and reset properly