fix compability with old PHP version