Fixes sqlite thread bashing.