Fix for compatible with PHP5.4