Fix for closed DB's