Fixed some php errors