Fix broken logic in setup task