fix nullpointer exception in downsamplemanager

There was a npe so this is my fix but maybe you want to do something differently but for sure there's a problem and this pull request could be the solution