fix a bug with my Php code