Fixed exception in PHP < 5.3.6