fixing setup bugs as @environment is not defined