fix nullpointer exception in downsamplemanager