Fixing environment creation to reflect the changes on the database