greatly simplified callback detection, should be way more stable now