Fixed bug when setting environment detection for Laravel 4