Trying to fix problem in older PHP versions