beginning work on race condition bug
hopefully fixes the tricky #38