Fixing some warnings in PHP 5.4