diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp
index 59b811e900868fc105cba905fed95075794aea2c..1b943978da734f5880023ad78f2c928f627b9baa 100644
--- a/src/fix_nh.cpp
+++ b/src/fix_nh.cpp
@@ -74,9 +74,8 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
 
   double p_period[6];
   for (int i = 0; i < 6; i++) {
-    p_start[i] = p_stop[i] = p_period[i] = 0.0;
+    p_start[i] = p_stop[i] = p_period[i] = p_target[i] = 0.0;
     p_flag[i] = 0;
-    p_period[i] = 0.0;
   }
 
   // process keywords