fixed many problems around the logic of checking if the setup is ready