Fixed bug for PHP < 5.4