Wasn't taking the environment value correctly