Fixed undefined property error in PHP5.5.