db fetch fix for index