debugging loop for weird bug #17