Posible fix for issue when the db does not have any data