fix crashes
move update table into background thread