fix extension crashes on error + db updates