Fixed some php warnings