fixed 500 error for different vresions of php