fixed environment checking in routes.php