fixed setup code