fix db read issues