try to fix db-update
NOTE: The JS is horrible