fixed null db result bug