Fixed PHP5.4 notices