Fixed issue with new php versions