Fixed for Laravel 4.1.x

Here are some small fixed that caused by laravel 4.1