fixing some php issues