Fixed compatibility with old php