fixing broken status polling and adding tests