fixed incorrect NULL
final mods for fetching