Fix for PHP5.3

Problems with PHP5.3 fixed.