some more work on bug handler