Fix errors in modifying when command again