PHP errors fixed