corrected php script bug