fixed some php warnings