fixing some php warnings