bats and detection - several ugly hacks that need fixing.