diff --git a/htdocs/product/admin/price_rules.php b/htdocs/product/admin/price_rules.php
index e284572e7e7ad3174946c12055fba265fb5780b7..224acd9c04b6339087bd448d152b37ba3eae897a 100644
--- a/htdocs/product/admin/price_rules.php
+++ b/htdocs/product/admin/price_rules.php
@@ -155,7 +155,6 @@ $genPriceOptions = function($level) use ($price_options) {
 
 	return $return;
 };
-
 ?>
 
 	<table class="noborder">
@@ -173,7 +172,8 @@ $genPriceOptions = function($level) use ($price_options) {
 				<td class="fieldrequired" style="text-align: center"><?php
 					echo $langs->trans('SellingPrice').' '.$i;
 					// Label of price
-					if (! empty($conf->global->{"PRODUIT_MULTIPRICES_LABEL$i"})) {
+					$keyforlabel='PRODUIT_MULTIPRICES_LABEL'.$i;
+					if (! empty($conf->global->$keyforlabel)) {
 						print ' - '.$langs->trans($conf->global->$keyforlabel);
 					}
 					?>
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index fe432b5dc5ed174fdf1622244141fe5bd70de52f..25804b9f4f72a657e5f7d240c253cfd5e131e0d8 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -12,7 +12,7 @@
  * Copyright (C) 2014		Henry Florian			<florian.henry@open-concept.pro>
  * Copyright (C) 2014-2016	Philippe Grand			<philippe.grand@atoo-net.com>
  * Copyright (C) 2014		Ion agorria			    <ion@agorria.com>
- * Copyright (C) 2016		Ferran Marcet			<fmarcet@2byte.es>
+ * Copyright (C) 2016-2017	Ferran Marcet			<fmarcet@2byte.es>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -816,7 +816,7 @@ class Product extends CommonObject
                     // End call triggers
 				}
 
-				if (! $error && (is_object($this->oldcopy) && $this->oldcopy->ref != $this->ref))
+				if (! $error && (is_object($this->oldcopy) && $this->oldcopy->ref !== $this->ref))
 				{
 					// We remove directory
 					if ($conf->product->dir_output)
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index 1de78f46021e012abd81f479117dcd9a86c69e4f..83f8c8fc8b27e54776031773324aabcee79eea41 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -4,6 +4,7 @@
  * Copyright (C) 2005-2010 Regis Houssin        <regis.houssin@capnetworks.com>
  * Copyright (C) 2013	   Florian Henry        <florian.henry@open-concept.pro>
  * Copyright (C) 2014-2015 Marcos GarcĂ­a        <marcosgdf@gmail.com>
+ * Copyright (C) 2017      Ferran Marcet        <fmarcet@2byte.es>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -292,7 +293,7 @@ class Project extends CommonObject
                 	}
                 }
 
-                if (! $error && (is_object($this->oldcopy) && $this->oldcopy->ref != $this->ref))
+                if (! $error && (is_object($this->oldcopy) && $this->oldcopy->ref !== $this->ref))
                 {
                 	// We remove directory
                 	if ($conf->projet->dir_output)