Fix startup NullPointerException