Fixed a bug in Laravel 4.2