Fixed bug with certain PHP versions