eliminate race condition in image capture db update