some php warning fixes