Fix bug with php code