Fixed PHP errors