NOBUG compatibility fix for older php