Fixed some PHP errors