Fixing problems with re-entrancy.