Fix NullPointerException with class loading
Fixes #43