Trying to fix some nullpointer exceptions, not sure how the configapi works...