fix db locked up