Prevent crashing on database lock exception, #23