reverted change to support buggy php versions