Small fix to make sure db connection doesn't leak