added logging to fix whatever's wrong