correction for PHP < 5.2 compat