This should fix the racecondition issues with the sqlite backend.