fixed Strict Standard Norice and errors in PHP5.4