Bugfixes and .env generation